package com.ibeeking.found.file.service.common.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName("share")
public class ShareDO implements Serializable {
    private static final long serialVersionUID = -1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long shareId;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 分享时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "share_time")
    private LocalDateTime shareTime;

    /**
     * 失效时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "end_time")
    private LocalDateTime endTime;

    /**
     * 提取码
     */
    @TableField(value = "extraction_code")
    private String extractionCode;

    /**
     * 分享批次号
     */
    @TableField(value = "share_batch_num")
    private String shareBatchNum;

    /**
     * 分享类型(0公共,1私密,2好友)
     */
    @TableField(value = "share_type")
    private Integer shareType;

    /**
     * 分享状态(0正常,1已失效,2已撤销)
     */
    @TableField(value = "share_status")
    private Integer shareStatus;

}
